import math, sys

def test(n, v=False) :
    b = int(math.floor(math.sqrt(n**2 /2)))
    rhs = n**2 - n
    lhs = 2*b**2 - 2*b
    if v : c = 0
    if lhs == rhs :
        return b
    while lhs <= rhs :
	if v : c += 1
        if lhs == rhs :
            return b
        b += 1
        lhs = 2*b**2 - 2*b
    if v : print c
    return None

if __name__ == "__main__" :
    start = 10**12 + 15000000
    end = start + 5000000
    for n in range(start, end) :
        if n%100000 == 0 :
            print "..%i.." % n
            v = True
        else :
            v = False
        b = test(n, v)
        if b :
            print n, b
